Repository navigation
A pull request's description is a view of the facts recorded for its head - #674
Merged
Merged
Conversation
… the head differs A dependency run's description was built on the commit that changed the manifest, where the lockfile still resolved the old version. The lockfile was regenerated in later commits and the run completed with a description that still said "not moved on the head", still counted the advisory as not fixed and still listed items of the earlier head. - description: a hidden stamp names the head the description was built for. reconcile rebuilds it when the stamp is not the pull request's head: after every message in which CoderHelm moved the branch, in the checks and settle step, before a review of its own pull request, in the pull request watch and at the end of the run, which returns an error instead of completing on another head's description. - GitHub client: every request leaves through send_tracked, which notes the branch a successful ref update, contents write or merge moved. No caller has to remember to ask for a rebuild. - review: its open findings are written on the description as it is now and only while the reviewed head is still the head. It used to write back the copy it read when it started. - settle: an item that says a lockfile is out of sync is checked on the head by the repository's checks, never carried as CoderHelm's own. - own review: a finding that the description is behind the code triggers the rebuild and is dropped when the rebuild settles it. Every finding that is not pure style is CoderHelm's to act on. - dep_head: tests for suffixed versions, exact-version override keys and a package moved on a later head. - Incident case ar and its row in docs/incidents.md.
# Conflicts: # docs/incidents.md # services/worker/src/passes/description.rs # services/worker/src/passes/incidents/mod.rs # services/worker/src/passes/own_review.rs # services/worker/src/passes/pr.rs # services/worker/src/passes/security_fixes.rs
… evidence reads as a sentence
- description: the source test now also requires that every write is laid
out, that a model's text is fact checked before it is saved, and that a
rebuild gathers the facts, asks the reader pass, shapes, stamps, saves
and settles CoderHelm's own thread about the description. No module
other than the rebuild, the eval and the incident cases shapes a
description.
- pr_facts: the evidence after an item under "Look at first" starts with
an upper case letter ("crosses a major version. No safety evidence is
recorded ...").
…facts check The section #671 records (advisories on the head, families released together, the verification set) is built into a dependency pull request's body, shaped by description_facts::shape against the head's dependency facts, and must come out whole; a rebuild reads it through security_fixes::at_head.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pull request's description is now rendered from the facts recorded for its head: every written sentence is checked against them, what a reader sees first is about ten lines, and everything else is collapsed.
Check:
cd services && cargo test --workspace; the cases alone:cargo test -p worker description_eval -- --nocapture.Risk: Medium: every write of a description now passes through a new layout, and every rebuild through a new fact check that can remove a sentence.
Needed from you: a review. Nothing here is merged or deployed.
Review: decide whether this shape is the one wanted for every pull request. Feedback wanted: the fact check's rules in
services/common/src/pr_claims.rs(what it removes), and the three decisions under "Look at first".Look at first:
description-stamped-to-head, then main merged in (through Pin the dashboard for the quarantine and infrastructure findings release #670).create_ticketis set on the team's git conventions record; no dashboard switch yet), the missing "Actions: write" permission as an item for an admin (recorded on the run aspermission_needed; no API route or dashboard yet), and the installer still asks foractions: readonly.Summary
Two pull requests CoderHelm opened were read by people who found the code fine and the description unusable. A dependency security pull request was wrong in five places (a package "not moved on the head" that the lockfile resolves at the patched version, a lockfile "out of sync" that installs frozen, a fixed advisory listed as open, a wrong count of high advisories left, the package still listed as open), said "contract unchanged" with nothing behind it, gave no reason any major version jump was safe, was titled
fix(deps): ...in a repository that titles by ticket key, and carried commits prefixedKEY-1:. A three-file feature carried a page about its outside steps: a raw 403 with its JSON body twice, "needs access CoderHelm doesn't have" beside "(owner: CoderHelm)", "CoderHelm does this after the pull request opens" long after it had opened, and found facts and a query already run listed as items with owners.The cause is the same in both: many code paths each appended a section, and nothing held the result against what was recorded or read it as a person would.
Changes
A description is a view of facts (
common/src/pr_facts.rs,worker/src/passes/description_facts.rs,description.rs)Factsper head: the diff's files, the head's recorded check results with links, the ticket, the risk, what is open and who closes it, the steps outside the code, and for a dependency update the lines the lockfile resolves, advisories fixed, remaining and introduced, families, evidence per major, probes.description::buildgathers them and callsdescription_facts::shape, the one path every description takes. It runs on every rebuild of every kind of run.Every written sentence is checked (
common/src/pr_claims.rs)description::save_checked), and a first description is held against its diff before the pull request opens.What a reader sees first (
pr_facts::lead,common/src/pr_layout.rs)description::savelays out every write, so no writer can leave a section in sight that belongs below or a fold unbalanced.The reader pass (
common/src/pr_reader.rs)Steps outside the code (
common/src/pr_steps.rs,outside_work.rs,outside_exec.rs)runline that deploys.Titles and commits (
common/src/pr_conventions.rs,worker/src/passes/conventions.rs)Placeholders are never learned (
common/src/placeholders.rs,worker/src/passes/lesson_cleanup.rs)KEY-1:was learned: the line a review fix round writes into the description to say how it chose its commit message gave the convention as the exampleKEY-1:. The description is read back by the steps that learn from a pull request's outcome, and no lesson was checked for a placeholder.CoderHelm's own review threads
Not built: commit consolidation. The design: before a pull request is marked ready, and only while every commit is CoderHelm's and no person has reviewed or pushed, rebuild the branch as one commit per risk group, one for lockfiles and one for code a major required, with the same final tree. Two things make it unsafe to do here: a lockfile changes with every bump, so a per-group commit needs the manifest and lockfile regenerated per group, not hunks moved; and take-outs revert by the original commits, which would no longer be on the branch, so they would have to rebuild from the bump records (kept under a hidden ref) and not from history.
Not built, said plainly: the same reading for every ticket comment (only the outside-steps note is rewritten); re-running a confirmation after merge or deploy; the dashboard side of the two settings above.
Shared files touched:
worker/src/passes/description.rs,pr.rs,security_fixes.rs,dep_fix.rs,outside_work.rs,outside_exec.rs,fix_location.rs,own_review.rs,review_fix/commit_style.rs,mod.rs,main.rs,memory/mod.rs,incidents/mod.rs;common/src/lib.rs,git_conventions.rs,github_grants.rs,reviewer_prefs.rs,rewards/lessons.rs;docs/incidents.md.Verification
cargo fmt --check --all,cargo clippy --workspace --all-targets -- -D warningsandcargo test --workspacepass locally on the pushed head.worker/src/passes/description_eval.rs) keeps the dependency pull request, the feature pull request and an ordinary ticket's as cases, each with what the reviewer flagged as assertions, the rubric (what the reader must do is in the first five lines; no raw error, query, id or tool name in sight; nothing contradicts a recorded fact; the visible part is within the budget; nothing said twice) and recorded model replies. A second test shows the text as it was written fails it. The module says how to add a case.av_description_from_factspasses only when the description check, the convention check and the lesson check each catch every defect of the dependency pull request.description.rsstill pass and now also require the first description to be checked against its diff and read once, every write to be laid out, a model's text to be fact checked before it is saved, and every rebuild to gather the facts, ask the reader pass, shape, stamp, save and settle CoderHelm's own thread, with no other module shaping a description.